package com.tc.quartz.server.core;

import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.quartz.JobListener;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * 公共监听器
 * @author yongjin.ye
 *
 */
public class GlobalJobListener implements JobListener {

	protected static Logger log = LoggerFactory.getLogger(GlobalJobListener.class);
	
	@Override
	public String getName() {
		return "GlobalJobListener";
	}

	@Override
	public void jobToBeExecuted(JobExecutionContext context) {
		log.info("GlobalJobListener->jobToBeExecuted. jobName=" + context.getJobDetail().getKey().getName());
		
	}

	@Override
	public void jobExecutionVetoed(JobExecutionContext context) {
		log.info("GlobalJobListener->jobExecutionVetoed. jobName=" + context.getJobDetail().getKey().getName());
		
	}

	@Override
	public void jobWasExecuted(JobExecutionContext context, JobExecutionException jobException) {
		log.info("GlobalJobListener->jobWasExecuted. jobName=" + context.getJobDetail().getKey().getName());
		
	}

	

}
